Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 6 - Transform Objects / Transform Objects Reference
Functions / Transforming Shapes by Modifying Transform Mappings


GXRotateTransform

You can use the GXRotateTransform function to alter the mapping property of a transform object so that it rotates its associated shape a specified number of degrees around a specified origin.

void GXRotateTransform(gxTransform target, Fixed degrees, 
                        Fixed xOffset, Fixed yOffset);
target
A reference to the transform object whose mapping property you want to alter.
degrees
The amount to rotate.
xOffset
The horizontal coordinate of the origin to rotate around.
yOffset
The vertical coordinate of the origin to rotate around.
DESCRIPTION
The GXRotateTransform function calculates a new mapping matrix for the transform object referenced by the target parameter. When applied to a shape, the new mapping matrix performs the same mapping transformations on the shape as the original matrix, but the new matrix also rotates the shape by the number of degrees specified in the degrees parameter around the origin specified by the xOffset and yOffset parameters.

The coordinates of the origin are specified in local space.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
transform_is_nil 
Warnings 
rotate_transform_out_of_range 
Notices (debugging version) 
mapping_unaffected 
SEE ALSO
For an example of the use of this function, see Listing 6-3 on page 6-25.

For information about mapping matrices in general, see the mathematics chapter of Inside Macintosh: QuickDraw GX Environment and Utilities.

To rotate a shape by altering its geometry, use the GXRotateShape function, described on page 6-70.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996